package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.OrderStatisticsService;
import com.atguigu.spzx.model.vo.common.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author LT
 * @create 2024-03-20-16:45
 */
@RestController
@RequestMapping("/admin/order/orderStatistics")
public class OrderStatisticsController {

    @Resource
    OrderStatisticsService orderStatisticsService;

    @GetMapping("/list/{begin}/{end}")
    public Result getList(@PathVariable("begin") String begin,
                           @PathVariable("end") String end){
        Map<String,Object> map = orderStatisticsService.list(begin,end);
        return Result.ok(map);
    }






}
